#ifndef __SPI_H
#define __SPI_H
#include "sys.h"

#define SPI2_PORT GPIOB
#define SPI2_NSS_PIN GPIO_Pin_12
#define SPI2_SCK_PIN GPIO_Pin_13
#define SPI2_MISO_PIN GPIO_Pin_14
#define SPI2_MOSI_PIN GPIO_Pin_15

void SPI2_Init(void);

void SPI2_Start(void);

uint8_t SPI2_SwapByte(uint8_t b);

void SPI2_Stop(void);

#endif
